package chapter2.No2_1_synchronized同步方法.b实例变量非线程安全;

/**
 * !
 *
 * @author liujian
 * @version 2016/11/11 0011
 */
public class ThreadB extends Thread {

    private TestObject test;

    public ThreadB(TestObject test) {
        this.test = test;
    }

    @Override
    public void run() {
        try {
            test.doTest("b");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
